/**
 * 
 */
package com.momosw.games.engine;

import java.util.LinkedList;
import java.util.List;

import com.momosw.games.engine.player.Player;
import com.momosw.games.jericho.actions.DrawCardAction;
import com.momosw.games.jericho.actions.FeedSupplyAction;
import com.momosw.games.jericho.actions.PlayCardAction;

/**
 * <b>Project:</b> JerichoCardGame<br />
 * <b>Package:</b> com.momosw.games.engine<br />
 * <b>Class:</b> InitialTurn.java<br />
 * <br />
 * <i>GSI 2011</i><br />
 *
 * @author Miguel Coronado (miguelcb84@gmail.com)
 * @version	Aug 20, 2011
 *
 */
public class InitialTurn extends Turn {

    public InitialTurn(Game game, Player player) {
        super(game, player);
    }

    /**
     * SetUp the current turn. This usually includes building the TurnSequence
     * @param config
     */
    void setUpTurn (GameConfiguration config) {
        List<TurnSequenceNode> nodes = new LinkedList<TurnSequenceNode>();
        nodes.add( new TurnSequenceNode()
            .addAction(new DrawCardAction(super.game, super.currentPlayer), 1));
        nodes.add( new TurnSequenceNode()
            .addAction(new DrawCardAction(super.game, super.currentPlayer), 1));
        nodes.add( new TurnSequenceNode()
            .addAction(new DrawCardAction(super.game, super.currentPlayer), 1));
        nodes.add( new TurnSequenceNode()
            .addAction(new DrawCardAction(super.game, super.currentPlayer), 1));
        nodes.add( new TurnSequenceNode()
            .addAction(new DrawCardAction(super.game, super.currentPlayer), 1));
        nodes.add( new TurnSequenceNode()
            .addAction(new DrawCardAction(super.game, super.currentPlayer), 1));
        
        nodes.add( new TurnSequenceNode()
            .addAction(new PlayCardAction(super.game, super.currentPlayer), 1));
        nodes.add( new TurnSequenceNode()
            .addAction(new FeedSupplyAction(super.game, super.currentPlayer), 1));
        
        nodes.add( new TurnSequenceNode()
            .addAction(new EndTurnAction(super.game, super.currentPlayer), 1));
        
        this.turnSequence = new TurnSequence(nodes);
    }
    
}
